#ifndef __ORBITSYSTEM_H__
#define __ORBITSYSTEM_H__


#include "../Global.h"
#include "../Circle/Circle.h"
#include "OrbitDefine.h"

class Circle;

class OrbitSystem : public CCNode
{
public:
	OrbitSystem( );
	virtual ~OrbitSystem( );

	void			initWithRadius				( float radius , int segment = 36 );
	void			addCircle					( Circle* pCircle );
	void			removeCircle				( Circle* pCircle );

	void			setRadius					( float radius );

	void			runFadeOutAnimation			( );
	void			runFadeInAnimation			( );
	void			runToOriginAnimation		( float nextRadius );

	void			animationUpdate				( float dt );

	inline
	float			getRadius					( )
	{
		return m_fRadius;
	}

	CREATE_SET_GET( CCSpriteBatchNode* , m_pBatchNode , BatchNode );
	CREATE_SET_GET( int , m_iNumSegment , Segment );


private:
	float			m_fRadius;
	float			m_fAncientRadius;
	float			m_fNextRadius;
	CCArray*		m_pListActiveCircle;
};


#endif